<?php
/**
 * 
 * @author Paolo Bertuzzo
 *
 */
namespace User\Data;

use User\Entity\OrderAddress;

class OrderAddressDao extends AbstractDao
{
    
    /**
     * 
     * @param integer $orderHeaderId
     * @param string $type
     * @param string $street
     * @param string $number
     * @param string $city
     * @param string $state
     * @param string $country
     * @param string $zipCode
     * @param integer $stateId
     * @param integer $countryId
     */
    public function insert($orderHeaderId, $type, $street, $number, $city, $zipCode, $state, $country)
    {
    	$orderAddress = new OrderAddress();
        
        $orderAddress->setOrderHeaderId($orderHeaderId);
    	$orderAddress->setType($type);
        $orderAddress->setCity($city);
        $orderAddress->setCountry($country);
        $orderAddress->setNumber($number);
        $orderAddress->setState($state);
        $orderAddress->setZipCode($zipCode);
        $orderAddress->setStreet($street);
        
    	$this->entityManager->persist($orderAddress);
    	$this->entityManager->flush();
    	
    	return $orderAddress;
    }
        
}

?>